package walker

import (
	"sort"
	"strings"
)

func findStringInSlice(x string, xs []string) int {
	i, found := sort.Find(len(xs), func(i int) int {
		return strings.Compare(x, xs[i])
	})

	if found {
		return i
	}
	return -1
}
